﻿Jxstar.currentPage = function() {
	var config = {param:{},initpage:function(page, define){},eventcfg:{}};

	var auditData = Jxstar.findComboData('audit');
	var moneytypeData = Jxstar.findComboData('moneytype');
	var plantypeData = Jxstar.findComboData('plantype');
	var changetypeData = Jxstar.findComboData('changetype');

	var cols = [
	{col:{header:'记录状态', width:58, sortable:true, align:'center',
		editable:false,
		editor:new Ext.form.ComboBox({
			store: new Ext.data.SimpleStore({
				fields:['value','text'],
				data: auditData
			}),
			emptyText: jx.star.select,
			mode: 'local',
			triggerAction: 'all',
			valueField: 'value',
			displayField: 'text',
			editable:false,
			value: auditData[0][0]
		}),
		renderer:function(value){
			for (var i = 0; i < auditData.length; i++) {
				if (auditData[i][0] == value)
					return auditData[i][1];
			}
		}}, field:{name:'money_change__auditing',type:'string'}},
	{col:{header:'计划编号', width:97, sortable:true}, field:{name:'money_change__plan_code',type:'string'}},
	{col:{header:'项目名称', width:217, sortable:true}, field:{name:'money_change__plan_name',type:'string'}},
	{col:{header:'调整原因', width:251, sortable:true, hidden:true}, field:{name:'money_change__change_desc',type:'string'}},
	{col:{header:'项目类别', width:95, sortable:true, align:'center',
		editable:false,
		editor:new Ext.form.ComboBox({
			store: new Ext.data.SimpleStore({
				fields:['value','text'],
				data: moneytypeData
			}),
			emptyText: jx.star.select,
			mode: 'local',
			triggerAction: 'all',
			valueField: 'value',
			displayField: 'text',
			editable:false,
			value: moneytypeData[0][0]
		}),
		renderer:function(value){
			for (var i = 0; i < moneytypeData.length; i++) {
				if (moneytypeData[i][0] == value)
					return moneytypeData[i][1];
			}
		}}, field:{name:'money_change__money_type',type:'string'}},
	{col:{header:'计划类型', width:72, sortable:true, align:'center',
		editable:false,
		editor:new Ext.form.ComboBox({
			store: new Ext.data.SimpleStore({
				fields:['value','text'],
				data: plantypeData
			}),
			emptyText: jx.star.select,
			mode: 'local',
			triggerAction: 'all',
			valueField: 'value',
			displayField: 'text',
			editable:false,
			value: plantypeData[0][0]
		}),
		renderer:function(value){
			for (var i = 0; i < plantypeData.length; i++) {
				if (plantypeData[i][0] == value)
					return plantypeData[i][1];
			}
		}}, field:{name:'money_change__plan_type',type:'string'}},
	{col:{header:'调整类型', width:79, sortable:true, align:'center',
		editable:false,
		editor:new Ext.form.ComboBox({
			store: new Ext.data.SimpleStore({
				fields:['value','text'],
				data: changetypeData
			}),
			emptyText: jx.star.select,
			mode: 'local',
			triggerAction: 'all',
			valueField: 'value',
			displayField: 'text',
			editable:false, allowBlank:false,
			value: changetypeData[0][0]
		}),
		renderer:function(value){
			for (var i = 0; i < changetypeData.length; i++) {
				if (changetypeData[i][0] == value)
					return changetypeData[i][1];
			}
		}}, field:{name:'money_change__change_type',type:'string'}},
	{col:{header:'调整前总投资(万元)', width:132, sortable:true, renderer:JxUtil.formatNumber(6)}, field:{name:'money_change__before_money',type:'float'}},
	{col:{header:'调整前当年投资(万元)', width:144, sortable:true, renderer:JxUtil.formatNumber(6)}, field:{name:'money_change__before_yearmoney',type:'float'}},
	{col:{header:'调整后总投资(万元)', width:127, sortable:true, renderer:JxUtil.formatNumber(6)}, field:{name:'money_change__after_money',type:'float'}},
	{col:{header:'调整后当年投资(万元)', width:146, sortable:true, renderer:JxUtil.formatNumber(6)}, field:{name:'money_change__after_yearmoney',type:'float'}},
	{col:{header:'调概批复文号', width:129, sortable:true}, field:{name:'money_change__chg_fileno',type:'string'}},
	{col:{header:'调整申请人', width:100, sortable:true}, field:{name:'money_change__change_user',type:'string'}},
	{col:{header:'调整申请日期', width:100, sortable:true, renderer:function(value) {
			return value ? value.format('Y-m-d') : '';
		}}, field:{name:'money_change__apply_date',type:'date'}},
	{col:{header:'备注', width:100, sortable:true, hidden:true}, field:{name:'money_change__change_memo',type:'string'}},
	{col:{header:'投资计划ID', width:100, sortable:true, hidden:true}, field:{name:'money_change__plan_id',type:'string'}},
	{col:{header:'主键', width:100, sortable:true, hidden:true}, field:{name:'money_change__change_id',type:'string'}},
	{col:{header:'调整申请人ID', width:100, sortable:true, hidden:true}, field:{name:'money_change__change_userid',type:'string'}},
	{col:{header:'数量', width:100, sortable:true, hidden:true, renderer:JxUtil.formatNumber(2)}, field:{name:'money_plan__plan_num',type:'float'}},
	{col:{header:'单位', width:100, sortable:true, hidden:true}, field:{name:'money_plan__plan_unit',type:'string'}},
	{col:{header:'单价(万元)', width:100, sortable:true, hidden:true, renderer:JxUtil.formatNumber(6)}, field:{name:'money_plan__plan_price',type:'float'}},
	{col:{header:'预计实施时间', width:100, sortable:true, hidden:true}, field:{name:'money_plan__plan_period',type:'string'}},
	{col:{header:'预算年度', width:62, sortable:true}, field:{name:'money_plan__plan_year',type:'string'}},
	{col:{header:'申报日期', width:100, sortable:true, renderer:function(value) {
			return value ? value.format('Y-m-d') : '';
		}}, field:{name:'money_plan__plan_date',type:'date'}},
	{col:{header:'申报人', width:68, sortable:true}, field:{name:'money_plan__plan_user',type:'string'}},
	{col:{header:'主要内容与申请理由', width:100, sortable:true, hidden:true}, field:{name:'money_plan__plan_desc',type:'string'}},
	{col:{header:'申报人ID', width:100, sortable:true, hidden:true}, field:{name:'money_plan__plan_userid',type:'string'}},
	{col:{header:'申报部门', width:100, sortable:true}, field:{name:'money_change__dept_name',type:'string'}},
	{col:{header:'申报部门ID', width:100, sortable:true, hidden:true}, field:{name:'money_change__dept_id',type:'string'}},
	{col:{header:'调概批文名称', width:100, sortable:true, hidden:true}, field:{name:'money_change__chg_filename',type:'string'}}
	];
	
	config.param = {
		cols: cols,
		sorts: null,
		hasQuery: '1',
		isedit: '0',
		isshow: '1',
		funid: 'money_chg'
	};
	
	
		
	return new Jxstar.GridNode(config);
}